clear
clc

load data
X = Features;
Y = Label;
clear Features Label

data_normed = zscore(X);

aplsc_model = aplsc(data_normed, Y);
n_dim = 3; % Could be set to integer greater than 1
Y_hat = test_aplsc(aplsc_model, data_normed, n_dim);
[accuracy, sensitivity, specificity] = calc_classification_performance(Y, Y_hat);

Y_hat2 = test_aplsc(aplsc_model, data_normed(1:100, :), n_dim);
all(Y_hat(1:100) == Y_hat2)
